<?php

/**
 * @author 
 * @copyright 2013
 */

class Introduce_policy_model extends CI_Model {
    function __construct() {
        parent::__construct();
        $this->load->database();  
        $this->load->helper(array('form', 'url'));
        $this->load->library('form_validation');
        $this->load->library('session');
    }
    
    public function get_user_quan(){
        $sql = "SELECT user_quan 
                FROM general_data";
        $query = $this->db->query($sql);
        $i = 0;
        foreach($query->result() as $row) {
            $i = $row->user_quan;
            
        }
        return $i;
    }
    
        
    
    function get_helper()
    {
        $sql="SELECT * FROM helper ";
        $query=$this->db->query($sql);
        $get_data=null;
        $i=0;
        foreach ($query->result() as $row )
        {
            
            $get_data['question_number'][$i]=$row->QUESTION_NUMBER;
            $get_data['question'][$i]=$row->QUESTION;
            $get_data['answer'][$i]=$row->ANSWER;
            $get_data['link_image'][$i]=$row->LINK_IMAGE;
        $i++;
            
        }
        
        return $get_data;
    }
}

?>